package com.yuyou.activity.group.service.service;

import com.yuyou.activity.group.service.vo.req.ReqActivityGroupSPSubOrder;
import com.yuyou.activity.group.service.vo.resp.*;
import com.yuyou.activity.util.bean.ResBoolSimpleInfo;
import com.yuyou.activity.util.bean.ReturnResult;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.util.List;
import java.util.Set;

public interface IActivityGroupSPService {

    /**
     * 同步用户数据至shipin.com
     * @param name
     * @param phone
     * @param courseIds
     * @return
     */
    ReturnResult<String> synchUserOrder2Shipin(String name , String phone , String courseIds);
    
    ResBoolSimpleInfo<String> submitOrder(ReqActivityGroupSPSubOrder reqActivityGroupSPSubOrder) throws Exception;

    /**
     * 计算原价和优惠价
     * @param groupType
     * @param goodsIds
     * @return
     */
	RespCalPrice calculate(String projectCode,int groupType, Set<Long> goodsIds);

    /**
     * 获取商品列表
     * @param projectCode
     * @return
     */
    List<GroupSpGoodsVo> findGoods(String projectCode);

    /**
     * 获取可拼团列表
     * @param projectCode
     * @param limit
     * @return
     */
    List<RespCanActivityGroupSPList> findMoreCanActivityGroupBuy(String projectCode,int limit);


    /**
     * 开团情况
     * @param projectCode
     * @param activityGroupId
     * @return
     */
    ResBoolSimpleInfo<RespActivityGroupSPDetail> activityGroupSPDetailById(String projectCode, Long activityGroupId , String openId);

    /**
     * 退款申请
     * @param orderId
     * @return
     * @throws Exception
     */
	ResBoolSimpleInfo<String> refundByOrderId(String projectCode,String orderId)
			throws Exception;


    /**
     * 部分退款申请
     * @param orderId
     * @return
     * @throws Exception
     */
    ResBoolSimpleInfo<String> refundPartByOrderId(String projectCode,String orderId,Long amount)
            throws Exception;

    /**
     * 订单补偿
     * @param activityGroupbuyOrderId
     * @return
     * @throws Exception
     */
	ResBoolSimpleInfo<String> compensateOrder(Long activityGroupbuyOrderId)
			throws Exception;


	HSSFWorkbook excelSPOrders(String projectCode,String text,String orderId, Integer payStatus,String phone);

}
